package cn.jilian.meta.handler.domain;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonIgnore;

public class Component extends Base {
	
	
	
	private String name;
	
	private String xtype;

	private String alignTarget;
	
	private String anchor;
	
	private Boolean autoShow;
	
	private Integer number;
	
	private Integer columnWidth;
	
	private Boolean frame;
	
	private String hideMode;
	
	private Boolean model;
	
	private Boolean modelValidation;
	
	private Boolean floating;
	
	private Integer width;
	
	private Integer height;
	
	private Map<String,Function> listeners;
	
	public void on(String name,Function function) {
		if(listeners==null) {
			listeners=new HashMap<>();
		}
		listeners.put(name, function);
	}

	public String getAlignTarget() {
		return alignTarget;
	}

	public void setAlignTarget(String alignTarget) {
		this.alignTarget = alignTarget;
	}

	public String getAnchor() {
		return anchor;
	}

	public void setAnchor(String anchor) {
		this.anchor = anchor;
	}

	public Boolean getAutoShow() {
		return autoShow;
	}

	public void setAutoShow(Boolean autoShow) {
		this.autoShow = autoShow;
	}

	public Integer getNumber() {
		return number;
	}

	public void setNumber(Integer number) {
		this.number = number;
	}

	public Integer getColumnWidth() {
		return columnWidth;
	}

	public void setColumnWidth(Integer columnWidth) {
		this.columnWidth = columnWidth;
	}

	public Boolean getFrame() {
		return frame;
	}

	public void setFrame(Boolean frame) {
		this.frame = frame;
	}

	public String getHideMode() {
		return hideMode;
	}

	public void setHideMode(String hideMode) {
		this.hideMode = hideMode;
	}

	public Boolean getModel() {
		return model;
	}

	public void setModel(Boolean model) {
		this.model = model;
	}

	public Boolean getModelValidation() {
		return modelValidation;
	}

	public void setModelValidation(Boolean modelValidation) {
		this.modelValidation = modelValidation;
	}

	public Boolean getFloating() {
		return floating;
	}

	public void setFloating(Boolean floating) {
		this.floating = floating;
	}

	public Integer getWidth() {
		return width;
	}

	public void setWidth(Integer width) {
		this.width = width;
	}

	public Integer getHeight() {
		return height;
	}

	public void setHeight(Integer height) {
		this.height = height;
	}
	
	public String getXtype() {
		return xtype;
	}

	public void setXtype(String xtype) {
		this.xtype = xtype;
	}

	public Map<String, Function> getListeners() {
		return listeners;
	}

	public void setListeners(Map<String, Function> listeners) {
		this.listeners = listeners;
	}

	@JsonIgnore
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
	
}
